var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var ObjectId=mongoose.Schema.ObjectId;

var schema = new mongoose.Schema({
	name:String,
	title:String,
	sex:String,
	cateId:ObjectId,
	news:String,
	commentCount:String,
	date: { type: Date, default: Date.now }
})

schema.plugin(mongoosePaginate);

module.exports = mongoose.model('News',schema,'news');